import routerMap from './router.map'
import {parseRoutes} from '@/utils/router-util'

// 异步路由配置
const routesConfig = [
  {
    router: 'root',
    path: '/',
    name: '首页'
  },
  {
    router: 'login',
    path: '/login',
    name: '登录'
  },
  {
    router: 'exp500',
    path: '/500',
    name: '500'
  },
  {
    router: 'exp403',
    path: '/403',
    name: '403'
  },
  {
    router: 'exp404',
    path: '*',
    name: '404'
  }
]

const options = {
  mode: 'hash',
  routes: parseRoutes(routesConfig, routerMap)
}

export default options
